<template>
	<section class="section">
		<div class="item">
			<span class="left">用户名：</span><span class="right">{{cards.user_name}}</span>
		</div>
		<div class="item">
			<span class="left">用户密码：</span><span class="right">{{cards.password}}</span>
		</div>
		<div class="item">
			<span class="left">昵称：</span><span class="right">{{cards.nickname}}</span>
		</div>
		<div class="item">
			<span class="left">登录时间：</span><span class="right">{{cards.login_time}}</span>
		</div>
		<div class="item">
			<span class="left">创建时间：</span><span class="right">{{cards.create_time}}</span>
		</div>
	</section>
</template>

<style scoped>
.section{
	margin-top: 40px;
	box-shadow: 1px 3px 7px rgba(0,0,0,.2);
	padding: 20px 0;
}
.item{
	line-height: 40px;
}
.item .left{
	display: inline-block;
	vertical-align: middle;
	width: 200px;
	text-align: right;
	margin-right: 20px;
	color: #999;
}
.item .right{
	display: inline-block;
	vertical-align: middle;
	color: #333;
}
</style>

<script>
	import { accounts } from '@/api/api';
	export default {
		data() {
			return {
				cards: {},
			}
		},
		mounted() {
			this.id = this.$route.query.id
			this.get_cards();
		},
		methods: {
			router(path) {
				this.$router.push(path)
			},
			//获取设备警报信息
			get_cards() {
				accounts(this.id, 'GET').then((res) => {
					this.cards = res.data.data
				});
			},
		}
	}

</script>